import Vue from 'vue'
import App from './App'
import store from './store'
import MinCache from'./common/util/MinCache.js'
import tip from'./common/util/tip.js'
import configService from'./common/service/config.service.js'
// 注册缓存器
Vue.use(MinCache,{timeout: 6})

// store
Vue.prototype.$store=store;
// tip
Vue.prototype.$tip=tip;
Vue.prototype.$config=configService;
// request请求
import { http } from '@/common/service/service.js' 
Vue.prototype.$http = http

import people from './pages/user/people.vue'
Vue.component('people',people)

import notask from './pages/notask/notask.vue'
Vue.component('notask',notask)

import workcard from './pages/workcard/workcard.vue'
Vue.component('workcard',workcard)
import errSub from './pages/errSub/errSub.vue'
Vue.component('errSub',errSub)

import directScane from './pages/directScane/directScane.vue'
Vue.component('directScane',directScane)

import cuCustom from './plugin/colorui/components/cu-custom.vue'
Vue.component('cu-custom',cuCustom)
import router from './common/router'

Vue.config.productionTip = false

App.mpType = 'app'

const app = new Vue({
	store,
	MinCache,
    ...App
})
//v1.3.5起 H5端 你应该去除原有的app.$mount();使用路由自带的渲染方式
// #ifdef H5
	RouterMount(app,'#app');
// #endif

// #ifndef H5
	app.$mount(); //为了兼容小程序及app端必须这样写才有效果
// #endif

// // #ifndef VUE3
// import Vue from 'vue'
// Vue.config.productionTip = false
// App.mpType = 'app'
// const app = new Vue({
//     ...App
// })
// app.$mount()
// // #endif

// // #ifdef VUE3
// import { createSSRApp } from 'vue'
// export function createApp() {
//   const app = createSSRApp(App)
//   return {
//     app
//   }
// }
// // #endif